import { request } from '@/common/request'
const userApi = {

	findUserCouponList: (data : any) => {
		return request({
			data,
			url: '/jsCoupon/applet/findUserCouponList',
			method: 'get',
		})
	},
	findCouponDetail: (data : any) => {
		return request({
			data,
			url: '/jsCoupon/applet/findCouponDetail',
			method: 'get',
		})
	},
	findAppletCouponList: (data : any) => {
		return request({
			data,
			url: '/jsCoupon/applet/findAppletCouponList',
			method: 'get',
		})
	},
	receiveCoupon: (data : any) => {
		return request({
			data,
			url: '/jsCoupon/applet/receiveCoupon?couponId=' + data.couponId,
			method: 'post',
		})
	},
	getSignCalendar: () => {
		return request({
			url: '/jsHome/getSignCalendar',
			method: 'get',
		})
	},
	userSign: () => {
		return request({
			url: '/jsHome/userSign',
			method: 'post',
		})
	},
	getExchangeableCoupons: (data : any) => {
		return request({
			data,
			url: '/jsHome/getExchangeableCoupons',
			method: 'get',
		})
	},
	getUserPoints: () => {
		return request({
			url: '/jsHome/getUserPoints',
			method: 'get',
		})
	},
	exchangeCoupon: (data:any) => {
		return request({
			data,
			url: '/jsHome/exchangeCoupon',
			method: 'post',
		})
	},
	getConversionRecord: () => {
		return request({
			url: '/jsHome/getConversionRecord',
			method: 'get',
		})
	},
	findMyDoctor: () => {
		return request({
			url: '/jsHome/findMyDoctor',
			method: 'get',
		})
	},
	findElectronRecordList: (data:any) => {
		return request({
			data,
			url: '/jsElectronRecord/findElectronRecordList',
			method: 'get',
		})
	},
	addElectronRecord: (data:any) => {
		return request({
			data,
			url: '/jsElectronRecord/addElectronRecord',
			method: 'post',
		})
	},
	updateElectronRecord: (data:any) => {
		return request({
			data,
			url: '/jsElectronRecord/updateElectronRecord',
			method: 'put',
		})
	},
	
	findVisitRemindList: () => {
		return request({
			url: '/jsSubsequentVisitRemind/list',
			method: 'get',
		})
	},
	addVisitRemind: (data:any) => {
		return request({
			data,
			url: '/jsSubsequentVisitRemind/add',
			method: 'post',
		})
	},
	cancelVisitRemind: (id:string) => {
		return request({
			url: `/jsSubsequentVisitRemind/cancel/${id}`,
			method: 'post',
		})
	},
	getMyMedicalRecords: (data:any) => {
		return request({
			data,
			url: '/jsHome/getMyMedicalRecords',
			method: 'get',
		})
	},
	verifyCoupon: (couponCode:string) => {
		return request({
			url: `/storeServe/verify/`+couponCode,
			method: 'get',
		})
	},
	useCoupon: (data:any) => {
		return request({
			data,
			url: `/storeServe/verify`,
			method: 'post',
		})
	},
	verifyRecordsLog: (data:any) => {
		return request({
			data,
			url: `/storeServe/verifyRecords`,
			method: 'get',
		})
	},
	getAppointments: (data:any) => {
		return request({
			data,
			url: `/storeServe/appointments`,
			method: 'get',
		})
	},
	sureAppointments: (params:any) => {
		return request({
			url: `/storeServe/appointments/confirm?pcUserId=${params.pcUserId}&id=${params.id}`,
			method: 'post',
		})
	},
	cancelAppointments: (data:any) => {
		return request({
			data,
			url: `/storeServe/appointments/cancel/${data.id}`,
			method: 'post',
		})
	},
	getPatients: (data:any) => {
		return request({
			data,
			url: `/storeServe/patients`,
			method: 'get',
		})
	},
	getPatientsDetail: (id:string) => {
		return request({
			url: `/storeServe/patients/${id}`,
			method: 'get',
		})
	},
	findCurrentUserInfo: (params:any) => {
		return request({
			data:params,
			url: `/storeServe/findCurrentUserInfo`,
			method: 'get',
		})
	},
	findUserReservationList: (data:any) => {
		return request({
			data,
			url: `/appointment/list`,
			method: 'get',
		})
	},
}
export default userApi